package com.qiwenshare.file.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.hibernate.annotations.Comment;
import org.hibernate.validator.constraints.Length;

import javax.persistence.*;

/**
 * @author MAC
 * @version 1.0
 * @description: 公告
 * @date 2021/11/22 22:16
 */
@Data
@Table(name = "notice")
@Entity
@TableName("notice")
public class Notice {
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    //@TableId(type = IdType.AUTO)
    //@Column(columnDefinition="bigint(20)", unique = true)
    @TableId
    private Long noticeId;

    @Comment("标题")
    @Column(length=100, nullable = false)
    private String title;

    @Comment("平台(1-社区,2-管理端,3-网盘,4-股票)")
    //@Column(columnDefinition="int(2)")
    private Integer platform;

    @Comment("markdown原文")
    @Column(columnDefinition = "text")
    private String markdownContent;

    @Comment("html内容")
    @Column(columnDefinition = "text")
    private String content;

    @Comment("有效时间")
    @Column(length = 25)
    private String validDateTime;

    @Comment("是否长期有效(0-否,1-是)")
    //@Column(columnDefinition="int(1)")
    private int isLongValidData;


    @Comment("创建时间")
    @Column(length = 25)
    private String createTime;

    @Comment("创建用户id")
    //@Column(columnDefinition="bigint(20)")
    private Long createUserId;

    @Comment("修改时间")
    @Column(length = 25)
    private String modifyTime;

    @Comment("修改用户id")
    //@Column(columnDefinition="bigint(20)")
    private Long modifyUserId;
}
